import { useDataShowHttp, useUserHttp } from '@/api/useHttp';
import { IDataShowParam, IDataShowReturn, R } from '@/api/types';

export enum DataShowApi {
  caidDisease = '',
  cbidDisease = '/cbidDisease/getCbidData',
  ccidDisease = '/ccidDisease/getCbidData',
  epiDiease = '/epiDiease/getEpiAllData',
  chrdDisease = '/chrdDisease/getAllChrDisData',
}

export const reqCaidData = (param: IDataShowParam) => {
  return useDataShowHttp<R<IDataShowReturn>>(
    {
      url: DataShowApi.caidDisease,
      data: param,
      method: 'POST',
    },
    false
  );
};
export const reqCbidData = (param: IDataShowParam) => {
  return useDataShowHttp<R<IDataShowReturn>>(
    {
      url: DataShowApi.cbidDisease,
      data: param,
      method: 'POST',
    },
    false
  );
};
export const reqCcidData = (param: IDataShowParam) => {
  return useDataShowHttp<R<IDataShowReturn>>(
    {
      url: DataShowApi.ccidDisease,
      data: param,
      method: 'POST',
    },
    false
  );
};
export const reqEpiData = (param: IDataShowParam) => {
  return useDataShowHttp<R<IDataShowReturn>>(
    {
      url: DataShowApi.epiDiease,
      data: param,
      method: 'POST',
    },
    false
  );
};
export const reqChrdData = (param: IDataShowParam) => {
  return useDataShowHttp<R<IDataShowReturn>>(
    {
      url: DataShowApi.chrdDisease,
      data: param,
      method: 'POST',
    },
    false
  );
};
